<template>
    <div class="content">
        <div class="detail">
            <div v-html="detail">
            </div>
        </div>
    </div>
</template>
<script>
import axios from 'axios';
import {mapGetters} from 'vuex';
import { CHANGE_NAVIGATION } from '../../config/postMessage-types';

// let api = {
//     base_host: "http://test.vmbase.scn.weilian.cn",
//     enterpriseCode: "NJXS",
//     customer_host: "http://test.vmcustomer.scn.weilian.cn",
// }
export default {
    data () {
        return {
            detail: ''
        }
    },
    components:{

    },
    computed:{
        
    },
    mounted(){
        let expCode = this.$route.query.expCode;
        let title = this.$route.query.interpretationTitle;
        expCode && this.getInterpretation(expCode);
        let titleConfig = JSON.stringify({
            type: CHANGE_NAVIGATION,
            params: {
                title: title
            }
        })
        setTimeout(() => {
            window.postMessage(titleConfig)
        },300)
    },
    methods:{
        getInterpretation(expCode) {
            let options = {
                url: api.base_host + '/expMana/findDetail',
                method: 'GET',
                params: {
                    expCode: expCode,
                },
            };
            axios(options).then(res => {
                console.log(res.data.data[0],'ressssss');
                this.detail = res.data.data[0].detail;
            })
        }
    },
    watch:{
        
    }
}
</script>
<style scoped>
    .content{
        margin: 1rem 0rem;
        padding: 0rem 0.5rem;
        text-align: left;
    }
    .detail{
        background-color: #fff;
        padding: 0.5rem 0.75rem 1.5rem 0.75rem;
    }
</style>